package org.dromara.apartment.mapper;

import org.apache.ibatis.annotations.MapKey;
import org.dromara.apartment.domain.ApartmentFacility;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;

import java.util.List;
import java.util.Map;

/**
 * 公寓配套关联表 数据层
 *
 * @author Lion Li
 */
public interface ApartmentFacilityMapper extends BaseMapperPlus<ApartmentFacility, ApartmentFacility> {


    /**
     *
     * 根据公寓ID查询配套名称集合
     * @param apartmentId
     * @return
     */
    List<String> selectFacilityNamesById(Long apartmentId);



    /**
     *
     * 根据公寓ID查询配套ID集合
     * @param apartmentId
     * @return
     */
    Long[] selectFacilityIdsById(Long apartmentId);


    /**
     * 根据公寓ID查询配套集合
     * @param apartmentId
     * @return
     */
    @MapKey("id")
    List<Map<String,Object>> selectFacilityListById(Long apartmentId);

}
